package com.houweishi.module.staff.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.houweishi.common.annotation.Excel;
import com.houweishi.common.core.domain.BaseEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.Date;
import java.util.StringJoiner;

/**
 * 员工管理对象 biz_staff
 * 
 * @author houweishi
 * @date 2023-02-21
 */
@Data
public class BizStaff extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增主键 */
    private Long id;

    /** 姓名 */
    @Excel(name = "姓名")
    private String name;

    /** 姓名 */
    @Excel(name = "姓名")
    private String userName;

    /** 性别（1男 2女） */
    @Excel(name = "性别", readConverterExp = "1=男,2=女")
    private String gender;

    /** 年龄 */
    @Excel(name = "年龄")
    private String age;

    /** 出生年月 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDate birthday;

    /** 籍贯 */
    @Excel(name = "籍贯")
    private String nativePlace;

    /** 政治面貌 */
    @Excel(name = "政治面貌")
    private String politicalOutlook;

    /** 婚姻 */
    @Excel(name = "婚姻状况")
    private String marriage;

    /** 学历（全日制、非全日制） */
    @Excel(name = "学历", readConverterExp = "全=日制、非全日制")
    private String education;

    /** 身高（cm） */
    @Excel(name = "身高", readConverterExp = "c=m")
    private String height;

    /** 体重(kg) */
    @Excel(name = "体重(kg)")
    private String weight;

    /** 健康状况（1良好 2基础疾病） */
    @Excel(name = "健康状况", readConverterExp = "1=良好,2=基础疾病")
    private String healthStatus;

    /** 所学专业 */
    @Excel(name = "所学专业")
    private String speciality;

    /** 职称 */
//    @Excel(name = "职称")
    private String title;

    /** 身份证号码 */
    @Excel(name = "身份证号码")
    private String idCardNumber;

    /** 毕业院校 */
    @Excel(name = "毕业院校")
    private String graduationSchool;

    /** 入学时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入学时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDate admissionTime;

    /** 毕业时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "毕业时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDate graduationTime;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String telephone;

    /** 联系地址 */
    @Excel(name = "联系地址")
    private String address;

    /** 紧急联系人名称 */
    @Excel(name = "紧急联系人名称")
    private String contactName;

    /** 紧急联系人关系 */
    @Excel(name = "紧急联系人关系")
    private String relationship;

    /** 紧急联系人电话 */
    @Excel(name = "紧急联系人电话")
    private String contactTelephone;

    /** 个人照片 */
//    @Excel(name = "个人照片")
    private String personalPhotos;

    /** 学历照片 */
//    @Excel(name = "学历照片")
    private String educationalPhotos;

    /** 其他证书照片 */
//    @Excel(name = "其他证书照片")
    private String otherCertificatePhotos;

    /** 技能 */
    @Excel(name = "技能")
    private String skill;

    /** 入职时间（工龄） */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入职时间", readConverterExp = "工龄")
    private LocalDate entryTime;

    /** 是否缴纳社保(1已交 2未交) */
    @Excel(name = "是否缴纳社保(1已交 2未交)")
    private String socialSecurity;

    /** 未交社保原因 */
    @Excel(name = "未交社保原因")
    private String reason;

    /** 是否缴纳商业险(1已交 2未交) */
    @Excel(name = "是否缴纳商业险(1已交 2未交)")
    private String commercialInsurance;

    /** 职务 */
    @Excel(name = "职务")
    private String post;

    /** 试用薪资 */
    @Excel(name = "试用薪资")
    private String probationSalary;

    /** 转正薪资 */
    @Excel(name = "转正薪资")
    private String fullMemberSalay;

    /** 劳动合同签约时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "劳动合同签约时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date contractStartTime;

    /** 劳动合同终止时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "劳动合同终止时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date contractEndTime;

    /** 离职日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "离职日期", width = 30, dateFormat = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate leaveDate;

    /** 离职证明照片 */
    @Excel(name = "离职证明照片")
    private String leavingCertificatePhotos;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 状态：0待入职 1在职 2休假 3离职 */
    @Excel(name = "在职状态：0待入职 1在职 2休假 3离职")
    private String status;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    /** 开户行 */
    @Excel(name = "开户银行")
    private String bank;

    /** 银行卡号 */
    @Excel(name = "银行卡号")
    private String bankCardNo;

    /** 部门id */
//    @Excel(name = "部门id")
    private Long dept;

    /** 部门名称 */
    @Excel(name = "部门名称")
    private String deptName;

    /** 所属租户 */
//    @Excel(name = "所属租户")
    private Long tenantId;

    /** 用户id */
//    @Excel(name = "用户id")
    private Long userId;

    /** 奖项或证书（照片） */
//    @Excel(name = "奖项或证书", readConverterExp = "照片")
    private String prize;

    /** 自我评价 */
    @Excel(name = "自我评价")
    private String selfEvaluation;

    /** 未来发展期望 */
    @Excel(name = "未来发展期望")
    private String expect;

    /** 员工排序 */
    @Excel(name = "员工排序")
    private String sort;

    /** 自选字段 */
    //    @Excel(name = "自选字段")
    private String fieldsNames ;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    /** 公司 */
    @Excel(name = "公司")
    private String company;

    /** 职级id */
    private Long rankId;

    /** 职级 */
    @Excel(name = "职级")
    private String staffRank;

    /** 类型 */
    @Excel(name = "类型")
    private String staffType;

    /** 现住址 */
    @Excel(name = "现住址")
    private String presentAddress;

    /** 职务id */
    @Excel(name = "职务id")
    private Long postId;

    /** 时长 */
    @Excel(name = "时长")
    private Long clockTime;

    /** 是否需要打卡 */
    @Excel(name = "是否需要打卡")
    private String isClock;


    @Override
    public String toString() {
        return new StringJoiner(", ", BizStaff.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("name='" + name + "'")
                .add("gender='" + gender + "'")
                .add("age='" + age + "'")
                .add("birthday=" + birthday)
                .add("nativePlace='" + nativePlace + "'")
                .add("politicalOutlook='" + politicalOutlook + "'")
                .add("marriage='" + marriage + "'")
                .add("education='" + education + "'")
                .add("height='" + height + "'")
                .add("weight='" + weight + "'")
                .add("healthStatus='" + healthStatus + "'")
                .add("speciality='" + speciality + "'")
                .add("title='" + title + "'")
                .add("idCardNumber='" + idCardNumber + "'")
                .add("graduationSchool='" + graduationSchool + "'")
                .add("admissionTime=" + admissionTime)
                .add("graduationTime=" + graduationTime)
                .add("telephone='" + telephone + "'")
                .add("address='" + address + "'")
                .add("contactName='" + contactName + "'")
                .add("relationship='" + relationship + "'")
                .add("contactTelephone='" + contactTelephone + "'")
                .add("personalPhotos='" + personalPhotos + "'")
                .add("educationalPhotos='" + educationalPhotos + "'")
                .add("otherCertificatePhotos='" + otherCertificatePhotos + "'")
                .add("skill='" + skill + "'")
                .add("entryTime=" + entryTime)
                .add("socialSecurity='" + socialSecurity + "'")
                .add("reason='" + reason + "'")
                .add("commercialInsurance='" + commercialInsurance + "'")
                .add("post='" + post + "'")
                .add("probationSalary='" + probationSalary + "'")
                .add("fullMemberSalay='" + fullMemberSalay + "'")
                .add("contractStartTime=" + contractStartTime)
                .add("contractEndTime=" + contractEndTime)
                .add("leaveDate=" + leaveDate)
                .add("leavingCertificatePhotos='" + leavingCertificatePhotos + "'")
                .add("email='" + email + "'")
                .add("status='" + status + "'")
                .add("delFlag='" + delFlag + "'")
                .add("bank='" + bank + "'")
                .add("bankCardNo='" + bankCardNo + "'")
                .add("dept=" + dept)
                .add("deptName='" + deptName + "'")
                .add("tenantId=" + tenantId)
                .add("userId=" + userId)
                .add("prize='" + prize + "'")
                .add("selfEvaluation='" + selfEvaluation + "'")
                .add("expect='" + expect + "'")
                .add("sort='" + sort + "'")
                .add("fieldsNames='" + fieldsNames + "'")
                .add("remark='" + remark + "'")
                .add("company='" + company + "'")
                .add("staffRank='" + staffRank + "'")
                .add("staffType='" + staffType + "'")
                .add("presentAddress='" + presentAddress + "'")
                .add("postId='" + postId + "'")
                .toString();
    }
}
